package com.shaozi.nc.io.mq;

import org.apache.log4j.Logger;

import com.shaozi.data.mq.protocol.ConnectionBuilder;
import com.shaozi.data.mq.protocol.stomp.StompTextProducer;
import com.shaozi.nc.web.action.bean.OrgChatGroupBean;


public class OrgGroupProducer extends StompTextProducer {
	private static final Logger logger = Logger.getLogger(OrgGroupProducer.class);

	public OrgGroupProducer(ConnectionBuilder connBuilder) {
		super(connBuilder);

	}

	public void pushMsg(OrgChatGroupBean chatGroup) {
		if (chatGroup == null) {
			logger.error("GenChatGroupBean is null, can not send to mq");
			return;
		}

		sendObj("com.shaozi.gen.chatgroup", chatGroup);
		logger.info(chatGroup.getUidList());
	}
}
